import React from 'react';
import { useLocation, Route } from 'react-router-dom';
import Home1 from './Home1';
const Home = () => {
    const loc = useLocation()  // 相当于 this.props.location
    console.log('loc', loc);
    return (
        <div>
            <h1>首页</h1>
            {/* 显示二级路由组件 */}
            <Route path='/home/home1' component={Home1}></Route>
        </div>
    );
}

export default Home;
